package com.bootlever.rmi.server.service.impl;

import com.bootlever.framework.rmi.annotation.RmiServerResource;
import com.bootlever.rmi.user.sdk.service.UserService;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
@RmiServerResource(registryPort = 9633,value = "/userService")
public class UserServiceImpl extends UnicastRemoteObject implements UserService {


    public UserServiceImpl() throws RemoteException {
    }

    public String getUserName(int id) throws Exception {
        if (id == 0) {
            return "张三";
        } else if (id == 1) {
            return "李四";
        }
        return "未知";
    }
}
